package com.example.dhhyc.demos.strategy.strategy3;

import lombok.Data;

/**
 * Describe :
 * question :
 *
 * @author BaiShanshan
 * @date 2024/5/3 10:12
 */
@Data
public class ReceiptStrategyContext {
    private ReceiptHandleStrategy receiptHandleStrategy;

    public void setReceiptHandleStrategy(ReceiptHandleStrategy receiptHandleStrategy) {
        this.receiptHandleStrategy = receiptHandleStrategy;
    }

    public void handleReceipt(Receipt receipt) {
        if (null != receipt) {
            receiptHandleStrategy.handleReceipt(receipt);
        }
    }
}
